﻿namespace Hotel.Web.Models
{
    using System.ComponentModel.DataAnnotations;

    public class Contacts
    {

        //NOT [Required], but if entered - sure to be right        
        [Display(ResourceType = typeof(Hotel.Web.Views.OrderRoom.RoomOrder), Name = "EMail")]
        [DisplayFormat(ConvertEmptyStringToNull = false)]
        [DataType(DataType.EmailAddress)]
        [RegularExpression("^[0-9a-z_.^]{2,30}@[0-9a-z_^.]{1,10}\\.[a-z]{2,4}$", ErrorMessageResourceType = typeof(Hotel.Web.Views.OrderRoom.RoomOrder), ErrorMessageResourceName = "EMailErrorMessage")]
        public string EMail { get; set; }

        [Required(ErrorMessageResourceType = typeof(Hotel.Web.Views.Shared.Validation), ErrorMessageResourceName = "RequiredErrorMessage")]
        [StringLength(50, MinimumLength = 5, ErrorMessageResourceType = typeof(Hotel.Web.Views.Shared.Validation), ErrorMessageResourceName = "PhoneErrorMessage")]
        [Display(ResourceType = typeof(Hotel.Web.Views.OrderRoom.RoomOrder), Name = "Phone")]
        public string Phone { get; set; }
    }
}